Ingredients for Successful System Level Automation & Design Methodology Support for Multiple Models of Computation, Heterogeneous Behavioral Hierarchy, Model-driven Validation, and Service-oriented Tool Integration Environment

نویسندگان

  • Hiren D. Patel
  • Michael S. Hsiao
  • William T. Baumann
  • Stephen H. Edwards
چکیده

begins with two typedefs. We use this coding style to avoid repeating complex types, which in this case are abs list and the vector. The abs list class is a utility class explained in the chapter that explains the graph package. However, its basic purpose is to provide a medium through which the abstract semantics functions can be invoked on all the refinements. The hierarchy fsms t type is used to hold pointers to the refinements within a state. The refinement t type is declared at [Listing 4.2, Line 26] for the data member fsm refs that holds the HFSM refinements in this state. Note that the class fsm model is not defined as yet and there is simply a forward class declaration used to allow compilation of the fsm state class. The entry actions() and exit actions() shown in [Listing 4.2, Line 8 & 9] can be overridden by the user if the user desires to employ the capability of entry and exit actions. The set run complete() and is run complete() member functions set the run complete private data member in [Listing 4.2, Line 27] and returns the Boolean value, respectively. When the run complete Boolean data member is set, then the refinements in this state must follow the run-to-complete semantics. The resetting of refinements within a state is done using reset hierarchy() in [Listing 4.2, Line 14]. This member function is usually invoked when a transition is set to the RESET Hiren D. Patel Chapter 4. Behavioral Hierarchy with Hierarchical FSMs (HFSMs) 61 type, which requires resetting the destination state’s refinements. Adding refinements into a state is done through the add fsm refinement() member function. This inserts a pointer to the HFSM into the fsm refs data member. However, before doing that, we ensure certain requirements on the added refinement, such as that the fsm pointer cannot be NULL and we check these using the private member function elaboration() [Listing 4.2, Line 29]. We define a member function that returns a Boolean value of true indicating that the state has at least one refinement embedded within it via the has hierarchy(). To retrieve refinements, we have the get fsm refinement models() member function in [Listing 4.2, Line 18], which returns a list of all the HFSMs in that state. We use an additional private member function get fsm refinement() in [Listing 4.2, Line 28] to get a pointer of type refinement t such that members from the abstract semantics can be invoked on all the refinements in the state. Listing 4.3: fsm transition Class Definition 1 class f sm t r an s i t i o n : public bgl edge , public abs semant i c s { 2 public : 3 typedef a b s l i s t < fsm model > r e f i n ement t ; 4 typedef vector< fsm model ∗> h i e r a r chy f sms t ; 5 virtual bool guard ( ) ; 6 virtual bool c h o i c e a c t i o n s ( ) ; 7 virtual bool commit act ions ( ) ; 8 bool i s e n ab l e d ( ) ; 9 bool i s p r e empt iv e ( ) ; 10 bool i s r e s e t ( ) ; 11 bool i s r un comp l e t e ( ) ; 12 void s e t enab l ed ( ) ; 13 void s e t preempt ive ( ) ; 14 void s e t r e s e t ( ) ; 15 void s e t run comp le t e ( ) ; 16 bool r e s e t h i e r a r c h y ( ) ; 17 void add fsm re f inement ( fsm model ∗ fsm ) ; 18 bool has h i e r a r chy ( ) ; 19 h i e r a r chy f sms t ge t f sm re f inement mode l s ( ) ; 20 /// Overload members o f a b s t r a c t semantics 21 /// . . . more code 22 /// Defaul t , over loaded cons t ruc to r s 23 /// Overloaded opera tors 24 /// . . . more code 25 private : 26 r e f i n ement t f sm r e f s ; 27 bool enabled ; 28 bool preemptive ; 29 bool r e s e t ; 30 bool run complete ; 31 void e l abo r a t i on ( fsm model ∗ fsm ) ; 32 r e f i n ement t ∗ ge t f sm re f i n ement ( ) ; 33 } ; The fsm transition class represents the transitions that connect the states of type fsm state. As depicted in Figure 4.6, the fsm transition class inherits from the bgl edge and abs sHiren D. Patel Chapter 4. Behavioral Hierarchy with Hierarchical FSMs (HFSMs) 62 emantics classes. The bgl edge class is a generic base class for representing edges in a graph and the abs semantics the abstract semantics associated with an executable entity. The virtual member functions in [Listing 4.3, Line 5 7] show the guard(), choice actions() and the commit actions(). The guard() member function requires the designer to test the guard associated with this transition and return a true in the case where the guard is satisfied and false when it is not. The return Boolean value is used in the kernel to trigger the actions associated with this transition. Depending on whether the guard is satisfied, the choice actions() or the commit actions() are executed. Member functions to get the properties of the transition are shown in [Listing 4.3, Line 8 11] and those that set the properties in [Listing 4.3, Line 12 15]. These get and set member functions check the type of the transition such as PREEMPTIVE, RESET or RUN-TO-COMPLETE. Their respective private data members are shown in [Listing 4.3, Line 27 30]. The transitions can also embed other HFSM refinements and thus we have the add fsm refinement() member function that allows inserting refinements in a transition. 4.5.3 HFSM Graph Representing the HFSM Model The generic graph package implements an moc graph templated class, which allows any MoC to easily implement their graph-like structure. The fsm graph class aggregates the moc graph class and renders the class with member functions specific for describing an FSM. Listing 4.4 displays the source code listing for the fsm graph class definition. The fsm graph typedefs a list of fsm state and fsm transition objects with state list and transition list. These are used as return types for retrieving all the states and transitions in the FSM using the get all states() and get all transitions() member function in [Listing 4.4, Line 7 & 8]. The set init state() member function sets the initial state for the HFSM, which assigns the pointer shown in [Listing 4.4, Line 28]. Similarly, the set final state() and the set curr state() set the final st and curr st private members in [Listing 4.4, Line 29 & 30]. Given a transition, the get target() member function returns the destination state of that transition. However, to retrieve the states that are connected to a particular state via some transition, we employ the get adjacent states(). The return type of this is once again a list of fsm state pointers. To retrieve all the outgoing transitions from a state, we use the get outgoing transitions() member function, which returns a transition list. The get num states() and get num transitions() return the number of states and transitions in the HFSM. Until now, the member functions described are used for manipulating the information present in the HFSM. However, to insert states and transitions into the HFSM we provide the insert state() and insert transition() member functions. We have overloaded these members so as to allow passing by reference as well as by pointer. The insertion of transition requires three arguments and they are the fsm state from which the transition is outgoing and the fsm state to which the transition is the destination and lastly the transition to be associated with the from and to fsm state objects as shown in [Listing 4.4, Line 21]. Finally, the private member shown in [Listing Hiren D. Patel Chapter 4. Behavioral Hierarchy with Hierarchical FSMs (HFSMs) 63 Listing 4.4: fsm graph Class Definition 1 class fsm graph 2 { 3 public : 4 typedef vector< f sm s ta t e ∗ > s t a t e l i s t ; 5 typedef vector< f sm t r an s i t i o n ∗ > t r a n s i t i o n l i s t ; 6 /// Functions only s p e c i f i c f o r fsm graph 7 s t a t e l i s t g e t a l l s t a t e s ( ) ; 8 t r a n s i t i o n l i s t g e t a l l t r a n s i t i o n s ( ) ; 9 void s e t i n i t s t a t e ( f sm s ta t e ∗ s t ) ; 10 void s e t f i n a l s t a t e ( f sm s ta t e ∗ s t ) ; 11 void s e t c u r r s t a t e ( f sm s ta t e ∗ s t ) ; 12 f sm s ta t e ∗ g e t i n i t s t a t e ( ) ; 13 f sm s ta t e ∗ g e t f i n a l s t a t e ( ) ; 14 f sm s ta t e ∗ g e t c u r r s t a t e ( ) ; 15 f sm s ta t e ∗ g e t t a r g e t ( const f sm t r an s i t i o n & t r ) ; 16 s t a t e l i s t g e t a d j a c e n t s t a t e s ( const f sm s ta t e & s t ) ; 17 t r a n s i t i o n l i s t g e t o u t g o i n g t r a n s i t i o n s ( const f sm s ta t e & s t ) ; 18 unsigned int get num state s ( ) ; 19 unsigned int ge t num t ran s i t i on s ( ) ; 20 void i n s e r t s t a t e ( f sm s ta t e & s t ) ; 21 void i n s e r t t r a n s i t i o n ( const f sm s ta t e & from , const f sm s ta t e & to , f sm t r an s i t i o n & t r ) ; 22 void i n s e r t s t a t e ( f sm s ta t e ∗ s t ) ; 23 void i n s e r t t r a n s i t i o n ( const f sm s ta t e ∗ from , const f sm s ta t e ∗ to , f sm t r an s i t i o n ∗ t r ) ; 24 fsm graph ( ) ; 25 ̃ fsm graph ( ) ; 26 private : 27 moc graph< f sm state , f sm t r an s i t i o n > fsm g ; 28 f sm s ta t e ∗ i n i t s t ; 29 f sm s ta t e ∗ f i n a l s t ; 30 f sm s ta t e ∗ c u r r s t ; 31 } ; 4.4, Line 27] is an aggregation of the moc graph class. The fsm g private data member is of type moc graph with the vertices being fsm state type and the edges being fsm transition type. Capturing the graph-like structure of the HFSM using fsm graph only allows a way to represent the HFSM, but it does not implement the abstract semantics or any real semantics associated with it. Since we wish to keep the semantic representation separate from the model representation, we implement the semantics or the HFSM kernel in the fsm director class. However, keeping heterogeneous behavioral hierarchy in mind, we need to associate one instance of the simulation kernel to one level of hierarchy of a model. To do this, we implement another class called fsm model that represents one HFSM model that has an association with the fsm director class as shown in [Listing 4.5, Line 18]. This class mainly implements accessory member functions alongside the abstract semantics. The check transitions() member function verifies that only one transition is enabled because otherwise the HFSM would express non-determinism, which we disallow in Hiren D. Patel Chapter 4. Behavioral Hierarchy with Hierarchical FSMs (HFSMs) 64 Listing 4.5: fsm model Class Definition 1 class fsm model : public fsm graph , public abs semant i c s 2 { 3 public : 4 /// fsm model s p e c i f i c f unc t i ons 5 int c h e c k t r a n s i t i o n s ( t r a n s i t i o n l i s t & t l ) ; 6 bool p r o c e s s t r a n s i t i o n s ( ) ; 7 f sm t r an s i t i o n ∗ g e t e n ab l e d t r a n s i t i o n ( ) ; 8 bool stop ( ) ; 9 bool t r i g g e r ( ) ; 10 bool i t e r a t e ( ) ; /// precondi t ion , execute , po s t e xecu t e 11 void r e s e t l a s t e n a b l e d t r a n s i t i o n ( ) ; 12 /// Overload members o f a b s t r a c t semantics 13 /// . . . more code 14 /// Defaul t , over loaded cons t ruc to r s 15 /// Overloaded opera tors 16 /// . . . more code 17 private : 18 f sm d i r e c t o r f sm d i r ; 19 f sm t r an s i t i o n ∗ enab l ed t r ; 20 } ; /// fsm model c l a s s our realization of the HFSM MoC. The process transitions() member function uses the check transitions() to ensure determinism. We incorporate a stop() member function that can be used to halt the execution of the FSM. The remainder of the member functions such as trigger() and iterate() were explained in the formalization of the execution semantics. The reset last enabled transition() simply resets the last enabled transition to its default. Listing 4.6: fsm director Class Definition 1 class f sm d i r e c t o r : public abs semant i c s 2 { 3 public : 4 void s e t f sm graph ( fsm model ∗ fsm ) ; 5 bool i t e r a t e ( ) ; 6 bool i t e r a t e r e f i n em e n t s s t a t e r t c ( f sm s ta t e ∗ s t ) ; 7 bool i t e r a t e r e f i n em e n t s t r a n s i t i o n r t c ( f sm t r an s i t i o n ∗ t r ) ; 8 /// Overload members o f a b s t r a c t semantics 9 /// . . . more code 10 /// Defaul t , over loaded cons t ruc to r s 11 /// Overloaded opera tors 12 /// . . . more code 13 private : 14 fsm model ∗ model ; 15 bool r e execute ; 16 } ; /// c l a s s f sm d i r e c t o r The actual kernel implementation is done in the fsm director class. One instance of the kernel only handles one level of the HFSM. Therefore, the kernel is associated with only one Hiren D. Patel Chapter 4. Behavioral Hierarchy with Hierarchical FSMs (HFSMs) 65 instance of the fsm model object as shown in [Listing 4.6, Line 14]. This pointer is assigned its fsm model during the initialization of the HFSM, which includes instantiating an object of fsm director and then invoking the set fsm graph() member function in [Listing 4.6, Line 4] to pass the address of the fsm model object. The iterate() member function again only invokes the precondition(), execute() and postcondition() of the abstract semantics. We also show specific iterate member functions for the state and transition refinements with the run-to-complete property in [Listing 4.6, Line 6 & 7]. These two member functions exhibit the same functionality except one is for refinements in states and the other in transitions. The member functions perform iterations on all the refinements until the HFSM reaches its final state. Once the HFSM reaches the final state, the reexecute Boolean private data member is set such as to inform the kernel that another iteration is not required for the RUN-TO-COMPLETE property refinements. The remainder of the abstract semantics actually implement the algorithms presented in the definitions earlier. We do not present the implementation details regarding the actual algorithm as we have already done so formally. 4.6 Modeling Guidelines for HFSM This section provides code snippets showing the programming style that can be used to model HFSM using the extension. The code snippets are for the example of the sampler presented in Figure 4. This sampler component shown in Figure 4.6 is a part of the power model which will be explained in section 4.7.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Reference Architecture for Automation of Inter-Organizational Process-Oriented Collaboration

In today’s competitive, dynamic, and changing business environment, being able to collaborate globally within and beyond the enterprise borders is critical. Inter-Organizational Collaborations (IOCs) have been proposed as a response to the characteristics of highly competitive global business environments. So far, a number of reference models, frameworks, and ad hoc architectures related to som...

متن کامل

Method integration: An approach to develop agent oriented methodologies

Agent oriented software engineering (AOSE) is an emerging field in computer science  and  proposes some systematic ideas for multi agent systems analysis, implementation and maintenance. Despite the various methodologies introduced in the agent-oriented software engineering, the main challenges are defects in different aspects of methodologies. According to the defects resulted from weaknesses ...

متن کامل

Shop Floor Information Management and SOA

Service Science is a new term for a new paradigm which aims at the solution of an obvious problem: How to make the increasing fusion of business and IT successful in a dynamically changing and risk adverse environment? This question has to be raised at different levels of abstraction, from macroeconomic viewpoints circulating around qualities of service societies to service oriented architectur...

متن کامل

A Modeling Specification Methodology to Support Simulation of Distributed Heterogeneous Power Systems

Today’s aircraft power systems have grown enormously in electrical content. This has been driven by a desire for system level optimization of aircraft in terms of performance and efficiency. In an effort to meet these new engineering constraints modern power electronics systems are extremely integrated and complex. A purely hardware driven methodology is no longer practical; the interplay betwe...

متن کامل

AMSI: An Automatic Model-Driven Service Identification from Business Process Models

The evolution of software engineering has passed through various paradigms; including structured programming, object oriented programming, component-based approaches and in recent years service-oriented computing. One of the key activities needed to develop a quality service oriented solution is the specification of service model. The majority of existing methods for service model specification...

متن کامل

از پیاده سازی معماری سرویس گرا تا چابکی سازمان با رویکرد مدلسازی پویایی سیستم

SOA is type of architecture that used service to simplify integration activities and use the components for reusable. Companies to survive in the dynamic environment needed to strengthen their organizations through information systems and service-oriented architecture is a way for the integration and effectiveness of the use of information systems and achieve organizational agility. In this pap...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007